//
//  NSString+DSHex.h
//  KX11UI
//
//  Created by HYC on 2021/2/19.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSString (HYC_Tools)



/// 字符串转颜色
- (UIColor *)H_color;

/// 字符串转图片
- (UIImage *)H_image;

/// 字符串转字体
- (UIFont *)H_font;

/// 字符串转字体
/// - Parameter we: 字体的Weight
- (UIFont *)H_weight:(UIFontWeight)we;

/// inter转时间字符串 , 例如: [@"yyyy年mm月DD HH:mm" time_Inter_ToStr:1708923829];
/// - Parameter date: 时间戳
- (NSString *)H_time_Inter_ToStr:(NSTimeInterval )date;

/// 字符串转时间戳 , 例如 : [@"yyyy年mm月DD HH:mm" time_Inter_ToStr:@"2022年11月09 19:20"];
/// - Parameter date: 字符串时间
- (NSTimeInterval )H_time_Str_ToInter:(NSString *)date;

/// 字符串转URL
- (NSURL *)H_urlImage;

/// 字符串打电话
- (void)H_Call;






/// 错误码转换
- (NSString *)Error_description;

/// 如果错误码中没有code对应的情况下返回的错误信息
- (NSString *)Error_description:(NSString *)Other;


/// 错误码表替换和增加
/// @param Other 如果错误码中没有code对应的情况下返回的错误信息
/// @param dict 增加或者需要修改错误信息
- (NSString *)Error_description:(NSString *)Other WithReplacement:(NSDictionary *)dict ;

/// 读取本地文件.字符串必须为名称.后缀
- (id _Nullable)H_READ_FILE;
@end

NS_ASSUME_NONNULL_END
